package com.prs.crm.domain.purchase;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.prs.crm.domain.BaseEntity;
import com.prs.crm.domain.stock.Product;

/**
 * 退货明细
 * 
 * @author 兰小刚
 * @version 创建时间：2010-7-20 上午11:18:28 类说明
 */
@Entity
@Table(name = "purchase_purchaseReturnedDetail")
public class PurchaseReturnedDetail extends BaseEntity {

	private static final long serialVersionUID = -4867503240956693033L;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;

	@ManyToOne
	private PurchaseReturned purchaseReturned;

	/**
	 * 商品编号
	 */
	private String productCode;
	/**
	 * 商品
	 */
	@ManyToOne
	private Product product;

	/**
	 * 商品名称
	 */
	private String productName;
	/**
	 * 商品条码
	 */
	private String barCode;
	/**
	 * 单位
	 */
	private String unit;
	/**
	 * 数量
	 */
	private int num;
	/**
	 * 单价
	 */
	private Double price;
	/**
	 * 金额
	 */
	private Double allPrice;
	/**
	 * 折扣
	 */
	private Double rebate;
	/**
	 * 折后单价
	 */
	private Double rebateUnit;
	/**
	 * 折后金额
	 */
	private Double rebatePrice;
	private String detailAll;
	public String getDetailAll() {
		return detailAll;
	}

	public void setDetailAll(String detailAll) {
		this.detailAll = detailAll;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public PurchaseReturned getPurchaseReturned() {
		return purchaseReturned;
	}

	public void setPurchaseReturned(PurchaseReturned purchaseReturned) {
		this.purchaseReturned = purchaseReturned;
	}

	public String getProductCode() {
		return productCode;
	}

	public void setProductCode(String productCode) {
		this.productCode = productCode;
	}

	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	public String getBarCode() {
		return barCode;
	}

	public void setBarCode(String barCode) {
		this.barCode = barCode;
	}

	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	public int getNum() {
		return num;
	}

	public void setNum(int num) {
		this.num = num;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public Double getAllPrice() {
		return allPrice;
	}

	public void setAllPrice(Double allPrice) {
		this.allPrice = allPrice;
	}

	public Double getRebate() {
		return rebate;
	}

	public void setRebate(Double rebate) {
		this.rebate = rebate;
	}

	public Double getRebateUnit() {
		return rebateUnit;
	}

	public void setRebateUnit(Double rebateUnit) {
		this.rebateUnit = rebateUnit;
	}

	public Double getRebatePrice() {
		return rebatePrice;
	}

	public void setRebatePrice(Double rebatePrice) {
		this.rebatePrice = rebatePrice;
	}

	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

}
